<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div>
    <div id="test"></div>
    <button onclick="close_win()">关闭</button>
</div>
    <script>
    const {ipcRenderer} = require('electron');
    const constant = require('../../util/constant')


    function close_win() {
        ipcRenderer.send(constant.win.CLOSE)
    }

    //1.发送数据
    // ipcRenderer.send(constant.win.MESSAGE, 'ping')
    // //2.接收数据
    // ipcRenderer.on(constant.win.MESSAGE, (event, arg) => {
    //     console.log(arg) // prints "pong"
    // })

</script>
</body>
</html>
